package com.zhuoshi.serviceImpl;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhuoshi.bean.OpeningPay;
import com.zhuoshi.bean.WdApartmentLayout;
import com.zhuoshi.bean.WdHtRoom;
import com.zhuoshi.bean.WdUser;
import com.zhuoshi.service.OpeningPayService;
import com.zhuoshi.service.WdRoomService;
import com.zhuoshi.service.WdUserService;
import com.zhuoshi.mapper.OpeningPayMapper;
import com.zhuoshi.mapper.WdApartmentLayoutMapper;
import com.zhuoshi.mapper.WdHtRoomMapper;
import com.zhuoshi.mapper.WdUserMapper;

@Service
public class WdRoomServiceImpl implements WdRoomService {
	
	@Autowired
    private WdHtRoomMapper wdHtRoomMapper;
	
	@Autowired
	private WdApartmentLayoutMapper wdApartmentLayoutMapper;

	@Override
	public List<WdHtRoom> selectAll(WdHtRoom wdHtRoom) {
		
		return wdHtRoomMapper.selectAll(wdHtRoom);
	}

	/**
	 * 删除一个的方法
	 */
	@Override
	public int deletOne(String id) {
		// TODO Auto-generated method stub
		return wdHtRoomMapper.deleteByPrimaryKey(id);
	}
	
	
	/**
	 * 查询全部的户型
	 */
	public List<WdApartmentLayout> selectAllLayOut()
	{
		return wdApartmentLayoutMapper.selectAll();
	}

	
	//添加一个的方法
	@Override
	public int add(WdHtRoom WdHtRoom) {
		// TODO Auto-generated method stub
		return wdHtRoomMapper.insertSelective(WdHtRoom);
	}
 
	//添加一堆的方法
	@Override
	public int insertByList(List<WdHtRoom> roomList) {
	
		return 	wdHtRoomMapper.insertByList(roomList);
	}
	
	
	@Override
	public List<WdHtRoom> selectAllRoom(WdHtRoom record) {
		
		return wdHtRoomMapper.selectAllRoom(record);
	}

	@Override
	public WdHtRoom selectByPrimaryKey(String roomId) {
		// TODO Auto-generated method stub
		return wdHtRoomMapper.selectByPrimaryKey(roomId);
	}
	
}
